(function($) {
	var me = this;
	$.extend($.messager, {
		defaultMaskText:"加载中……",
		mask:function(close) {
			if(typeof(me.mask) == "undefined") {
				var _this = this;
				var win = $("<div class='jquery-mask-body'></div>").appendTo(document.body);
				var text = $("<div class='jquery-mask-text'></div>").appendTo(win);
				var loading = $("<div class='jquery-mask-loading'>&nbsp;</div>").appendTo(win);
				win.css({
					"position" : "relative",
					"overflow" : "hidden"
				});
				me.mask = {
					open : function() {
						text.text(_this.defaultMaskText);
						win.window("open");
					},
					close : function() {
						win.window("close");
					},
					text : function(value) {
						text.text(value);
					}
				}
				win.window({
					title:"<font style='font-size:2px;'>&nbsp;</font>",
					width:400,
					height:120,
					draggable:false,
					resizable:false,
					collapsible:false,
					minimizable:false,
					maximizable:false,
					closable:false,
					closed:true,
					modal:true
				});


			}
			if(close === "close") {
				me.mask.close();
			} else {
				me.mask.open();
			}
			return me.mask;
		}
	});
})(jQuery);